let proxyObj = {}
proxyObj['/'] = {

    //websocket
    ws: false,
    //目标地址
    target: 'http://localhost:8081',
    //发送请求之前是否进行代理
    changeOrigin: true,
    
    //不重写
    pathRewrite: {
        '^/': '/'
    }

};

proxyObj['/ws'] = {
    ws: true,
    target: 'ws://localhost:8081',
};

module.exports = {
    devServer: {
        host: 'localhost',
        port: 8080,
        proxy: proxyObj
    }
}